<!--  -->
<template>
  <div>
    part1
    <button @click="change">跳转到part2</button>
    <div>
      <router-link to="/part1/child1">跳转到子路由1</router-link> | 
      <router-link to="/child2">跳转到子路由2</router-link>
      <div>
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
    }
  },
  methods:{
    change(){ 
      // this.$router.push({path:'/part2',query:{id:100}});
      this.$router.push({name:'part2',params:{id:100}});
    }
  }
}

</script>

<style scoped>

</style>
